<?php
namespace App\Controller\App;

use App\Query\MallQuery;
use App\Query\MallGoodsQuery;

class MallController extends Controller
{
    // 分类
    public function index()
    {
        return MallQuery::model()->get();
    }
    
    // 商品
    public function goods()
    {
        return MallGoodsQuery::query(
            MallGoodsQuery::status(),
            $this->inputs('mall_id', 'money_pay', 'money_shop', 'money_point')
        )->paginate(15)->toArray();
    }
    
    // 详情
    public function info($id)
    {
        return MallGoodsQuery::model()->find($id);
    }
}
